package com.bryantkobe.myspringcode.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 日志controller
 * @author: alienwarezzl
 * @date: 2025/9/21
 */
@RestController
@RequestMapping("/log")
@Tag(name = "Log模块",description = "用于测试Log模块")
public class LogController {
    private static Logger logger = LoggerFactory.getLogger(LogController.class);

    @Operation(summary = "testLog",description = "测试Log")
    @PostMapping("/testLog")
    public void testLog(String key) {
        logger.info("testLog key:{}",key);
        logger.warn("testLog key:{}",key);
        logger.error("testLog key:{}",key);
    }
}
